#include "render.h"
#include "glhead.h"
#include "global.h"

float def_lookat_dist = 30;

void render_universe()
{
	glPushMatrix();
	glTranslatef(0,0,-30);
	glEnable(GL_TEXTURE_2D);
	glBindTexture(GL_TEXTURE_2D, universeTex);
	glBegin(GL_QUADS);
		glTexCoord2f(0.0f, 1.0f); glVertex3f(-30.0f, -30.0f, 0.0f);
		glTexCoord2f(1.0f, 1.0f); glVertex3f( 30.0f, -30.0f, 0.0f);
		glTexCoord2f(1.0f, 0.0f); glVertex3f( 30.0f,  30.0f, 0.0f);
		glTexCoord2f(0.0f, 0.0f); glVertex3f(-30.0f,  30.0f, 0.0f);
	glEnd();
	glDisable(GL_TEXTURE_2D);
	glPopMatrix();
}


void render_all(void){
	gluLookAt(0.001f,50,0,0,0,0,0,0,-1);
	glGetFloatv(GL_MODELVIEW_MATRIX,lookat);
	//render_universe();
	glo->render();
}